package com.jsy.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class ItemMvcConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //将所有 /item/开头的请求都定位到classpath路径下的/item目录下
        registry.addResourceHandler("/item/**")
                .addResourceLocations("classpath:/item/");
    }
}
